package com.aqiang.day0528_shop.main.model

import com.aqiang.day0528_shop.main.api.MainApi
import com.aqiang.day0528_shop.main.contract.StairContract
import com.aqiang.day0528_shop.main.entity.BaseEntity
import com.aqiang.day0528_shop.main.entity.GoodsTypeEntity
import com.aqiang.day0528_shop.main.entity.NewEntity
import com.aqiang.lib_core.net.RetrofitManage
import kotlinx.coroutines.Deferred

class StairModel:StairContract.StairModel {
    override fun T(parentId: Int): Deferred<BaseEntity<List<GoodsTypeEntity>>> {
        return RetrofitManage.create(MainApi::class.java).getStair(parentId);
    }

    override fun second(parentId: Int): Deferred<BaseEntity<List<NewEntity>>> {
        return RetrofitManage.create(MainApi::class.java).getT(parentId);
    }

    override fun stair(parentId: Int): Deferred<BaseEntity<List<GoodsTypeEntity>>> {
        return RetrofitManage.create(MainApi::class.java).getStair(parentId);
    }
}